<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .content {
            width: 400px;
            height: 200px;
            background-color: #f0f0f0;
            border: 1px solid #666;
        }
    </style>
</head>

<body>
    <p>更换主题</p>
    <div class="content">
        <p>我是广西人，我喜欢吃螺xi hun，我的putong发很piao准</p>
    </div>
    <button id="btn1" onclick="changeTheme('#111', 'white', 'red')">深色主题</button>
    <button id="btn2" onclick="changeTheme('pink', 'white', 'red')">猛男粉</button>
    <button id="btn3" onclick="changeTheme('purple', 'white', 'red')">直男紫</button>
    <script>
        var btn1 = document.querySelector('#btn1');
        var btn2 = document.querySelector('#btn2');
        var btn3 = document.querySelector('#btn3');
        var div = document.querySelector('.content');

        function changeTheme(bgc, fc, bc) {
            console.log(1111);
            // bgc背景颜色 fc字体颜色 bc边框颜色
            div.style.backgroundColor = bgc;
            div.style.color = fc;
            div.style.borderColor = bc;
        }
    </script>
</body>

</html>